<template>
	<view class="books-box">
		<!-- 封面 -->
		<view class="cover">
			<image :src="books.cover" mode="aspectFit"></image>
		</view>
		<!-- 书籍、期刊基本信息 -->
		<view class="books-info">
			<!-- 题目、书名 -->
			<view class="title">{{books.name}}</view>
			<!-- 描述信息 -->
			<view class="desc">{{books.description}}</view>
			<!-- 相关统计信息 -->
			<view class="account">播放量：{{books.account}}</view>
		</view>
		
	</view>
</template>

<script>
	export default{
		props:{
			books:{
				type:Object
			}
		}
	}
</script>

<style lang="scss">
	.books-box{
		display: flex;
		height: 230upx;
		width: 100%;
		padding: 20upx 10upx;
		.cover{
			height:200upx;
			width: 160upx;
			margin-right:40upx;
			// border: 2upx solid #000000;
			image{
				width: 160rpx;
				// height:100%;
				// width: 100%;
			}
		}
		.books-info{
			flex:1;
			height: 100%;
			display:flex;
			flex-direction: column;
			justify-content: space-between;
			font-size: 28rpx;
			font-family: PingFangSC-Semibold, PingFang SC;
			overflow: hidden;
			.title{
				font-weight: 700;
				color: #333333;
			}
			.desc{
				word-break:break-all;
				display:-webkit-box;
				-webkit-line-clamp:2;
				-webkit-box-orient:vertical;
				overflow:hidden;
				font-weight: 500;
				color: #666666;
			}
			.account{
				font-size: 20rpx;
				font-weight: 500;
				color: #666666;
			}
		}
	}
</style>
